package com.iqiyi.pps.epg.core.service.basement;


import com.iqiyi.pps.epg.core.dao.base.Page;
import com.iqiyi.pps.epg.core.dao.base.PropertyFilter;
import com.iqiyi.pps.epg.core.model.basement.ConstantsMap;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: fangying
 * Date: 12-8-27
 * Time: 下午5:04
 * To change this template use File | Settings | File Templates.
 */
public interface ConstantsMapService {
    /**
     * 根据类型取ConstantsMap列表
     * @param type 类型
     * @return List<ConstantsMap>
     */
    public List<ConstantsMap> getList(Integer type);

    /**
     * 保存constantsMap对象
     * @param constantsMap ConstantsMap
     */
    public void save(ConstantsMap constantsMap);

    /**
     * 根据类型和code取对应的对象
     * @param type
     * @param code
     * @return
     */
    public ConstantsMap get(Integer type, String code);

    /**
     * 取实体对象
     * @param id 主键
     * @return ConstantsMap
     */
    public ConstantsMap get(Long id);

    /**
     * 分页获取ConstantsMap
     * @param page
     * @param filters
     * @return  Page<ConstantsMap>
     */
    public Page<ConstantsMap> getConstantsMapList(final Page<ConstantsMap> page, final List<PropertyFilter> filters);

    /**
     * 验证自字段唯一性
     * @param type
     * @param old
     * @param newValue
     * @return
     */
    boolean isPropertityUnique(String checkType, String old, String newValue, Integer type);

}
